home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / winterp-1.13 / contrib / xmu / GNU / gnus-menus.el next >
Encoding:
Text File  |  1991-10-06  |  4.3 KB  |  123 lines

  1. ; -*-Emacs-Lisp-*-
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;
  4. ; File:         gnus-menus.el
  5. ; RCS:          $Header: $
  6. ; Description:  GNUS menu's using the WINTERP-based menu server xmu-menu.el
  7. ; Author:       Richard Hess, Consilium.
  8. ; Created:      Sat Oct  5 23:24:49 1991
  9. ; Modified:     Sat Oct  5 23:42:32 1991 (Niels Mayer) mayer@hplnpm
  10. ; Language:     Emacs-Lisp
  11. ; Package:      N/A
  12. ; Status:       X11r5 contrib tape release
  13. ;
  14. ; WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  15. ; XLISP version 2.1, Copyright (c) 1989, by David Betz.
  16. ;
  17. ; Permission to use, copy, modify, distribute, and sell this software and its
  18. ; documentation for any purpose is hereby granted without fee, provided that
  19. ; the above copyright notice appear in all copies and that both that
  20. ; copyright notice and this permission notice appear in supporting
  21. ; documentation, and that the name of Hewlett-Packard and David Betz not be
  22. ; used in advertising or publicity pertaining to distribution of the software
  23. ; without specific, written prior permission.  Hewlett-Packard and David Betz
  24. ; make no representations about the suitability of this software for any
  25. ; purpose. It is provided "as is" without express or implied warranty.
  26. ;
  27. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  28.  
  29. ; +---------------------------------------------------------------------------
  30. ;  WHO:    Richard Hess                    CORP:   Consilium
  31. ;  TITLE:  Staff Engineer                  VOICE:  [415] 691-6342
  32. ;      [ X-SWAT Team:  Special Projects ]  USNAIL: 640 Clyde Court
  33. ;  UUCP:   ...!uunet!cimshop!rhess                 Mountain View, CA 94043
  34. ; +---------------------------------------------------------------------------
  35.  
  36. (setq *gnus_Group*
  37.       '(("browse"   "gnus-Browse-killed-groups")
  38.     ("post"     "gnus-Group-post-news")
  39.     ("Group" (("catch up" "gnus-Group-catch-up-all")
  40.           ("read"     "gnus-Group-read-group")
  41.           ("select"   "gnus-Group-select-group")
  42.           ))
  43.     ("List" (("all" "gnus3d12-Group-list-all-groups")
  44.          ("new" "gnus3d12-Group-list-groups")
  45.          ))
  46.     ("Update" (("new"     "gnus-Group-get-new-news")
  47.            ("restart" "gnus-Group-restart")
  48.            ("save"    "gnus-Group-force-update")
  49.            ))
  50.     nil
  51.     ("Kill File" (("global" "gnus-Group-edit-global-kill")
  52.               ("local"  "gnus-Group-edit-local-kill")
  53.               ))
  54.     nil
  55.     ("info"     "gnus-Info-find-node")
  56.     ))
  57.  
  58. (setq *gnus_Subject*
  59.       '(("expand"  "gnus-Subject-expand-window")
  60.     ("expunge" "gnus-Subject-delete-marked-as-read")
  61.     ("Mail" (("new"      "gnus-Subject-mail-other-window")
  62.          ("reply"    "gnus-Subject-mail-reply")
  63.          ("reply ++" "gnus-Subject-mail-reply-with-original")
  64.          ))
  65.     ("Post" (("new"   "gnus-Subject-post-news")
  66.          ("reply" "gnus-Subject-post-reply")
  67.          ))
  68.     ("Sort" (("author"  "gnus-Subject-sort-by-author")
  69.          ("date"    "gnus-Subject-sort-by-date")
  70.          ("number"  "gnus-Subject-sort-by-number")
  71.          ("subject" "gnus-Subject-sort-by-subject")
  72.          ))
  73.     ("Threads" (("hide" "gnus-Subject-hide-all-threads")
  74.             ("show" "gnus-Subject-show-all-threads")
  75.             ))
  76.     nil
  77.     ("Kill File" (("global" "gnus-Subject-edit-global-kill")
  78.               ("local"  "gnus-Subject-edit-local-kill")
  79.               ))
  80.     nil
  81.     ("info"    "gnus-Info-find-node")
  82.     ))
  83.  
  84. ;; ---------------------------------------------------------------------------
  85.  
  86. (defun gnus-XmuPopup (&optional arg)
  87.   "[ NEW ]:  Handle the GNUS pop-up menu... [ Xmu ]"
  88.   (interactive)
  89.   (let ((name (buffer-name))
  90.     key
  91.     pick
  92.     )
  93.     (cond ((eq name gnus-Group-buffer)   (setq key 900))
  94.       ((eq name gnus-Subject-buffer) (setq key 902))
  95.       ( t                            (setq key nil))
  96.       )
  97.     (if key
  98.     (progn
  99.       (setq pick (xmu_popup key t))
  100.       (if (not xmu-error)
  101.           (eval (list 'command-execute
  102.               (list 'quote (car (read-from-string pick)))))
  103.         (cond ((equal xmu-error ":NoMenu")
  104.            (gnus-XmuSetup))
  105.           (t nil))
  106.         ))
  107.       (message "GNUS::XmuPopup [ no menu ]")
  108.       )))
  109.  
  110. (defun gnus-XmuSetup ()
  111.   "[ NEW ]:  define the GNUS menus in the WINTERP menu server... [ Xmu ]"
  112.   (interactive)
  113.   (xmu_menu 900 "GNUS" *gnus_Group*    "::GNUS [ Group ]")
  114.   (xmu_menu 902 "GNUS" *gnus_Subject*  "::GNUS [ Subject ]")
  115.   (message "GNUS::XmuSetup [ menu's created ]")
  116.   )
  117.  
  118. (if (fboundp 'xterm-bind-key)
  119.     (xterm-bind-key "F8"    'gnus-XmuPopup)                    ;; [ NEW ]
  120.   )
  121.  
  122. ;; ----------------------------------------------------------------------<eof>
  123.